#include "window/main/mainwindow.h"
#include "window/login/loginwindow.h"

#include <QApplication>
#include <QStyle>      // 为了 alignedRect
#include <QScreen>     // 为了 primaryScreen()->availableGeometry()

Q_DECLARE_METATYPE(MSG)
Q_DECLARE_METATYPE(QList<quint16>)

#include "thread/UDPSocketThread.h"
#include "thread/ReceiveThread.h"

UDPSocketThread* udpSocketThread;
ReceiveThread* recvThread;
MainWindow* mainWindow;
LoginWindow* loginWindow;

int main(int argc, char *argv[])
{
    qRegisterMetaType<MSG>("MSG");
    qRegisterMetaType<QList<quint16>>("QList<quint16>");

    QApplication a(argc, argv);

    udpSocketThread = new UDPSocketThread();
    recvThread = new ReceiveThread();
    udpSocketThread->start();
    recvThread->start();

    loginWindow = new LoginWindow();
    loginWindow->show();
    return a.exec();

}
